# app/schemas/musics.py
from pydantic import BaseModel
from typing import Optional

class MusicBase(BaseModel):
    title: str
    artist: str
    duration: Optional[int] = None

class MusicCreate(MusicBase):
    pass

class MusicResponse(MusicBase):
    id: int
    
    class Config:
        orm_mode = True